require 'net/http'

puts( "This is a file downloader. It firstly requires the domain, then the /filename.whatever.")
puts( "This will automatically prompt you for both." )
puts( "Thank you, and happy downloading!" )
puts( "______________________________________________")
puts( " " )
puts( "Please enter the domain without http:// or /folder/" )
domain = gets()
puts( "Please enter the /folder/filename.whatever part" )
filenamewh = gets()
Net::HTTP.start( domain ) { |http|
  resp = http.get( filenamewh )
  open( "saved.jpg", "wb") { |file|
    file.write(resp.body)
   }
}
puts "Yay!!"